package cn.labbook.bluetooth.common;

/**
 * Created by Administrator on 2018/10/29.
 * Description : 系统自定义异常枚举类
 */
public enum SysExceptionEnum {
    EMPTY(0, "没有相关数据!"),
    UNSUPPORTED_PARAM(-1, "请求参数不合法!"),
    UNKNOWN_ACCOUNT(-2, "帐号或者密码错误!"),
    LOCKED_ACCOUNT(-3, "帐号已被锁定!"),
    DISABLED_ACCOUNT(-4, "帐号未生效!"),
    EXPIRED_ACCOUNT(-5, "帐号已过期!"),
    DUPLICATE_ACCOUNT(-6, "该账户名已被使用!"),
    DUPLICATE_SITE_ID(-7, "该地址编号重复!请重新操作"),
    DUPLICATE_SITE_NAME(-8, "同一节点下地址名不能重复!"),
    DUPLICATE_ROLE(-9, "该角色名已被使用!"),
    DUPLICATE_PAYMENT(-10, "缴费项目名不能重复!"),
    DUPLICATE_CHARGE_STRATEGY(-11, "电价收费策略名称不能重复"),
    NOT_NOW_DATA(-12, "该数据已被他人修改,请刷新页面查看"),
    SYSTEM_ERROR(-13, "系统错误");

    //code 要小于1
    private int code;
    private String msg;

    SysExceptionEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
